home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
UTILREEN
/
BITFNT38.LZH
/
HPLAJET2.BFC
< prev
next >
Wrap
Text File
|
1987-05-03
|
7KB
|
257 lines
n,"HP LaserJet II";
x: df=1; {init data format to 1}
x: xd=1; {single horizontal density}
x: yd=1; {single vertical density}
x: to=40;
x: lo=0;
x: cw=30;
x: ch=50;
x: ep=124,"Delta-X (quarter dots)";
a: aa=1; {allow adjacent dots}
a: fw=30;
a: fh=50;
a: bl=40;
a: d8=0; {d8=1 says downloading}
e; {end initialization section.}
a: zt=0; {will get no font trailer message if no loading entire font}
KI; {start input font header.}
a: zt=1; {used to suppress no font trailer message}
#:**, "Loading Font Header ";
L 2;
u: za;
j 2: za,ne,$1b; {look for esc}
u: zb;
j 2: zb,ne,$29; {look for ) }
u: zc;
j 2: zc,ne,$73; {look for s }
d: zl; {escape sequence main data length}
u: zz; {throw away term char}
w: fd,"Font Descriptor size"; {font descriptor size}
u: yz; {reserved}
u: ft,"Font type";
w: yz; {reserved}
w: bl; {Baseline Distance (dots)}
w: fw; {Cell Width (dots)}
w: fh; {Cell Height (dots)}
u: oo; {font overall orientation}
u: ks,"Spacing (0=fixed,1=prop)";
w: ss,"Symbol Set";
w: pt,"Pitch (quarter dots)";
w: jh,"Height (quarter dots)";
w: xh,"xHeight (quarter dots)";
s: wt,"Width Type";
u: st,"Style";
s: sw,"Stroke Weight";
u: tf,"Typeface";
j 4: fd,eq,40;
u: zz; {reserved}
u: sf,"Serif Style";
w: zz; {reserved}
s: ud,"Underline Distance (dots)";
u: uh,"Underline Height (dots)";
w: th,"Text Height (quarter dots)";
w: tw,"Text Width (quarter dots)";
w: zz; {reserved}
w: zz; {reserved}
u: pe,"Pitch Extended (1024ths dot)";
u: he,"Height Extended (1024ths dot)";
w: zz; {reserved}
w: zz; {reserved}
w: zz; {reserved}
q: fn,,16,"Font Name";
j 5: 1,eq,1;
L 4;
q: fn,,14,"Font Name";
L 5;
a: el=fp;
q: cy,,,"Copyright Notice"; {allowed to terminate by next escape}
a: el=fp-el; {length of copyright notice}
EI; {end input font header.}
L 8;
j 12:fp,ge,fs;
u: zz;
j 8: zz,ne,$1b; {look for esc}
u: zz;
j 8: zz,ne,$2a; {look for * }
u: zz;
j 8: zz,ne,$63; {look for c }
d: cc; {decimal code of character}
u: zz; {throw away term char}
L1; {label 1 to indicate start of character.}
$ : cc,"Loading code (hex) ";
L 11;
u: zz;
j 11: zz,ne,$1b; {look for esc}
u: zz;
j 11: zz,ne,$28; {look for ( }
u: zz;
j 11: zz,ne,$73; {look for c }
d: zl; {length of character descriptor and data}
u: zz; {throw away term char}
u: zf; {format of descriptor}
u: zx; {continuation}
u: zs; {descriptor size}
z 19:zs-1;
u: zz; {class ( data format)}
u: or; {Character Orientation}
u: zz; {reserved}
i: lo; {left offset}
i: to; {top offset}
w: cw; {character width}
w: ch; {character height}
i: ep; {endpoint}
L 19; R;
a: xl=zl-zs-2; {actual datalength}
j 31: zx,ne,0;
g:0,xl; {character data}
a: xc=xl;
L 31;
j 32: zx,ne,1;
g:xc,xl; {character data}
a: xc=0;
L 32;
ESL; {end character search, character loaded.}
j 8:1,eq,1; {go get next char}
L 12;
#:**,"Font loaded.";
KT; {start input font trailer.}
j 40: zt,eq,1; {suppress no font trailer message if loading entire font}
#R:**,"HP LaserJet II fonts do not have a trailer. Hit return.";
L 40;
a: zt=0; {will get no font trailer message if not loading entire font}
ET; {end font trailer.}
KS; {start search for an input character.}
z 10:fs-fp;
L 9;
u: zz;
j 9: zz,ne,$1b; {look for esc}
u: zz;
j 9: zz,ne,$2a; {look for * }
u: zz;
j 9: zz,ne,$63; {look for c }
d: zc; {decimal code of character}
$: zc,"Encountered code (hex): ";
#: fp,"At file position: ";
u: zz; {throw away term char}
j 14: zc,eq,cc;
L 13;
u: zz;
j 13: zz,ne,$1b; {look for esc}
u: zz;
j 13: zz,ne,$28; {look for ( }
u: zz;
j 13: zz,ne,$73; {look for c }
d: zl; {length of character descriptor and data}
u: zz; {throw away term char}
p: fp + zl - 1; {position file past this character}
j 9: zc,ne,cc; {looking for current code}
L 14;
# : cc,"Found code (dec)";
j 1: 1,eq,1; {found, go get it}
L 10; {char not found}
ESU; {end character search program (unsuccessful search)}
KO; {start output font header.}
L 88; {for download}
#:**, "Sending Font Header ";
u:$1b;
u:$29;
u:$73;
d:fd+cy; {escape sequence main data length}
y:"W"; {term char}
w: fd; {font descriptor size}
u:$00; {reserved}
u: ft; {font type}
w:$00; {reserved}
w: bl; {Baseline Distance (dots)}
w: fw; {Cell Width (dots)}
w: fh; {Cell Height (dots)}
u: ko; {Orientation (0=portrt,1=landscp)}
u: ks; {Spacing (0=fixed,1=prop)}
w: ss; {Symbol Set}
w: pt; {Pitch (quarter dots)}
w: jh; {Height (quarter dots)}
w: xh; {xHeight (quarter dots)}
s: wt; {Width Type}
u: st; {Style}
s: sw; {Stroke Weight}
u: tf; {Typeface}
j 44: fd,eq,40;
u:$00; {reserved}
u: sf; {Serif Style}
w:$00; {reserved}
s: ud; {Underline Distance (dots)}
u: uh; {Underline Height (dots)}
w: th; {Text Height (quarter dots)}
w: tw; {Text Width (quarter dots)}
w:$00; {reserved}
w:$00; {reserved}
u: pe; {Pitch Extended (1024ths dot)}
u: he; {Height Extended (1024ths dot)}
w:$00; {reserved}
w:$00; {reserved}
w:$00; {reserved}
q: fn,,16; {Font Name}
j 45: 1,eq,1;
L 44;
q: fn,,14; {Font Name}
L 45;
q: cy,,el; {Copyright Notice}
EO; {end output font header.}
a:cc=0; {start with first possible code, zero}
c; {select first valid code}
j 57:1,eq,1; {bypass first code check}
L 55;
c; {select first valid code}
j 59:cc,eq,0; {go to 59 if no more valid codes}
L 57;
KC; {start output character}
$ :cc,"Sending code (hex): ";
u:$1b;
u:$2a;
u:$63;
d: cc; {decimal code of character}
u:$45; {term char}
u:$1b;
u:$28;
u:$73;
d: dl+16; {length of character descriptor and data}
y:"W"; {term char}
u:4; {format of descriptor}
u:0; {continuation}
u:14; {descriptor size}
u:1; {class ( data format)}
u: co; {Character Orientation}
u:0; {reserved}
i: lo; {left offset}
i: to; {top offset}
w: cw; {character width}
w: ch; {character height}
i: ep; {endpoint}
g; {character data}
EC; {end output character.}
a:cc=cc+1;
j 55:1,eq,1;
L 59; {end}
KZ; {start output font trailer.}
j 89:d8,eq,1; {go finish download if downloading}
ET; {end font trailer.}
KP; {start download}
a:d8=1; {downloading indicator}
#a:id," Enter a font ID number (0 to 32767): ";
u:$1b;
u:$2a;
u:$63;
d:id;
u:$44;
j 88: 1,eq,1; {go save font to the printer}
L 89; {now make it primary}
a:d8=0; {turn off download indicator}
u:$1b;
u:$28;
#:id," Font loaded with ID: ";
d:id;
u:$58;
EP; {end download}
.